Messages exchanged in a communication network may be synchronous or asynchronous. An asynchronous message is a message that is sent without requiring a response from the recipient. A synchronous message is a message that is sent and a reply is expected before processing can continue. During a synchronous message exchange, the reply to the synchronous message must be processed before any other received messages even if other messages are received before the arrival of the reply to the synchronous message.
It is often important to ensure that asynchronous messages are processed in the same order that they were sent. As a result, in a communications network that includes both asynchronous and synchronous message exchanges, it may be necessary to ensure that synchronous message replies can be processed out of order without affecting the ordering of other received messages.
In a network environment or architecture that uses UNIX™ sockets, or more generally, any communication mechanism where received messages are buffered through a first-in first-out (FIFO) buffer, there is no mechanism for expedited access message retrieval or insertion. As a result, messages must be retrieved sequentially from the socket or FIFO buffer until the desired synchronous message reply is retrieved. It is not possible to simply write the undesired (i.e., not the reply message) messages back to the FIFO buffer as this could change the order of the messages in the buffer.
Devices that receive and process messages often need to perform multiple tasks. Therefore, it is beneficial for devices to be notified when messages are available to be read and processed. A simple notification method used in many architectures is to notify when data is available in the transport mechanism's FIFO buffer. For example, in a system using sockets as the transport mechanism, this notification can be provided by a select( ) function as defined by POSIX.1-2001. However, existing solutions that allow out of order reply retrieval from a single FIFO input source either require a more complex notification mechanism or eliminate the notification mechanism entirely, requiring devices to periodically poll for new messages.